<template>
  <div class="goods-item">
    <img :src="goodsitem.show.img" alt="">
    <div class="goods-info">
      <p>{{ goodsitem.title }}</p>
      <span class="price">{{ goodsitem.price }}</span>
      <span class="collect">{{ goodsitem.cfav }}</span>
    </div>
  </div>
</template>

<script>
export default {
  name: "GoodsListItem",
  props: {
    goodsitem: {
      type: Object,
      default() {
        return {}
      }
    }
  }
}
</script>

<style scoped>
/*.goods-item {*/
/*  padding-bottom: 40px;*/
/*  position: relative;*/
/*}*/

/*.goods-item img {*/
/*  width: 100%;*/
/*  border-radius: 5px;*/
/*}*/

/*.goods-info {*/
/*  font-size: 12px;*/
/*  position: absolute;*/
/*  bottom: 5px;*/
/*  left: 0;*/
/*  right: 0;*/
/*  overflow: hidden;*/
/*  text-align: center;*/
/*}*/

/*.goods-info p {*/
/*  overflow: hidden;*/
/*  text-overflow: ellipsis;*/
/*  white-space: nowrap;*/
/*  margin-bottom: 3px;*/
/*}*/

/*.goods-info .price {*/
/*  color: var(--color-high-text);*/
/*  margin-right: 20px;*/
/*}*/

/*.goods-info .collect {*/
/*  position: relative;*/
/*}*/

/*.goods-info .collect::before {*/
/*  content: '';*/
/*  position: absolute;*/
/*  left: -15px;*/
/*  top: -1px;*/
/*  width: 14px;*/
/*  height: 14px;*/
/*  background: url("../../../assets/img/common/collect.svg") 0 0/14px 14px;*/
/*}*/


.goods-item {
  padding-bottom: 30px;
}

.goods-item img {
  width: 100%;
  height: 90%;
}

.goods-info {
  font-size: 12px;
  text-align: center;
}

.goods-info p {
  overflow: hidden;
  text-overflow: ellipsis;   /*显示省略符号来代表被修剪的文本。*/
  white-space: nowrap;       /*规定段落中的文本不进行换行*/     /*white-space属性指定元素内的空白怎样处理*/
}

.goods-info .price {
  margin-right: 10px;
  color: red;
}

.goods-info .collect::before {
  content: '收藏:';
  font-size: 12px;
  /*background: url("../../../assets/img/common/collect.svg") 0 0/14px 14px;*/
}
</style>